from orion.util.HashFile import HashFile
import os
import unittest


class HashFileTest(unittest.TestCase):

    def testHash(self):
        expectedHash = "8e245d9679d31e12"
        filePath = "E:\\Development\\Projects\\Python\\Orion\\test\\resources\\breakdance.avi"
        hashFile = HashFile(filePath)
        self.assertEquals(hashFile.hash(), expectedHash)
    
    def testSize(self):
        filePath = "E:\\Development\\Projects\\Python\\Orion\\test\\resources\\breakdance.avi"
        expectedSize = os.path.getsize(filePath)
        hashFile = HashFile(filePath)
        self.assertEquals(hashFile.size(), expectedSize)
        

if __name__ == "__main__":
    unittest.main()